package com.ss.android.common.imagezoom;

final class d implements Runnable {
    private final ImageViewTouchBase g;
    private final float a;
    private final long b;
    private final float c;
    private final float d;
    private final float e;
    private final float f;

    d(ImageViewTouchBase arg2, float arg3, long arg4, float arg6, float arg7, float arg8, float arg9) {
        this.g = arg2;
        this.a = arg3;
        this.b = arg4;
        this.c = arg6;
        this.d = arg7;
        this.e = arg8;
        this.f = arg9;

    }

    public final void run() {
        double v10 = 0;
        double v8 = 2;
        float v2 = Math.min(this.a, ((float)(System.currentTimeMillis() - this.b)));
        double v4 = ((double)this.c);
        double v0 = (((double)v2)) / ((((double)this.a)) / v8);
        if(v0 < 1) {
            v0 = v0 * (v4 / v8 * v0 * v0) + v10;
        }
        else {
            v0 -= v8;
            v0 = (v0 * (v0 * v0) + v8) * (v4 / v8) + v10;
        }

        this.g.a((((float)v0)) + this.d, this.e, this.f);
        if(v2 < this.a) {
            this.g.j.post(((Runnable)this));
        }
        else if(this.g.m) {
            this.g.m = false;
        }
        else {
            this.g.m = true;
            this.g.b(this.g.getScale());
            this.g.c();
        }
    }
}

